package com.ming_za.od_updater_sdk.obj;

import com.ming_za.od_updater_sdk.server_api.ServerAPIState;

/**
 * 请求返回值
 * @param <T> 值类型
 */
public class ReqValue<T>{

    /**
     * 值
     */
    private T value;

    /**
     * API返回状态
     */
    private ServerAPIState serverAPIState;

    public ReqValue(T value, ServerAPIState serverAPIState) {
        this.value = value;
        this.serverAPIState = serverAPIState;
    }

    public ReqValue() {
        this.value = null;
        this.serverAPIState = ServerAPIState.SUCCESS;
    }

    public T getValue() {
        return value;
    }

    public ServerAPIState getServerAPIState() {
        return serverAPIState;
    }

    public void setValue(T value) {
        this.value = value;
    }

    public void setServerAPIState(ServerAPIState serverAPIState) {
        this.serverAPIState = serverAPIState;
    }
}
